<!--
 * @Author: 贾博林 11457230+jabolin@user.noreply.gitee.com
 * @Date: 2022-10-21 14:40:08
 * @LastEditors: 贾博林 11457230+jabolin@user.noreply.gitee.com
 * @LastEditTime: 2022-10-24 09:38:19
 * @FilePath: \v-shop\code\src\views\index.vue
 * @Description: 主页面
-->
<template>
 <el-container>
  <el-header>
    <img src="../assets/微信图片_20221020205604.jpg" alt="" class="img1" >
    <span  >电商后台管理系统</span>
    <el-button class="tc" @click="loginout"  >退出</el-button>
  </el-header>
  <el-container>
    <!-- 侧边栏组件 -->
    <Myaside></Myaside>
   
    <el-main>
        <router-view></router-view>
    </el-main>
  </el-container>
</el-container>
</template>

<script>
import Myaside from './myaside.vue';
export default {
  name:'index',
  data () {
    return {
    };
  },

  components: { Myaside },

  computed: {},

  mounted(){},

  methods:{
    loginout(){
      // 清除本地token
        localStorage.removeItem("token"),
        // 回退到登录页
        this.$router.push("/login")
    }
  },
  watch: {},
  mixins: []
}

</script>
<style  scoped>
  .el-header, .el-footer {
    background-color: #373d41;
    color: #333;
    color: white;

  }
  
  .el-aside {
    background-color: #333744;
    color: #333;
    color: white;
  
  }
  
  .el-main {
    background-color: #eaedf1;
    color: #333;
  
  }
  
 .el-container {
 height: 100%;
  }
  
  span{ 
     font-size: 30px;
    color:white;
    position: absolute;
    left: 92px;
    top: 7px;
    letter-spacing: 5px;
  }
  .tc{
    position: absolute;
    left: 1442px;
    top: 8px;
    background-color: #909399;
    color: white;
    border: 0px;
  }
  .img1{
    width: 50px;
    height: 50px;
    border:  1px solid #333744;
  }
  
</style>